package com.lagou.demo.controller;

import com.lagou.edu.mvcframework.annotations.LagouController;
import com.lagou.edu.mvcframework.annotations.LagouRequestMapping;
import com.lagou.edu.mvcframework.annotations.LagouSecurity;

@LagouController
@LagouRequestMapping("/shiro")
public class ShiroController {

    /**
     * URL: /shiro/one?name=lisi
     */
    @LagouRequestMapping("/one")
    @LagouSecurity("lisi")
    public String one(String name) {
        System.out.println("shiro权限测试");
        return "shiro权限测试";
    }

    /**
     * URL: /shiro/two?name=lisi
     * URL: /shiro/two?name=zhangsan
     */
    @LagouRequestMapping("/two")
    @LagouSecurity(value = {"lisi", "zhangsan"})
    public String two(String name) {
        System.out.println("shiro权限测试2");
        return "shiro权限测试2";
    }

}
